package com.fh.controller;

import com.fh.entity.po.Area;
import com.fh.common.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Controller
@RequestMapping("area")
public class AreaController {
    @Autowired
    private com.fh.service.AreaService areaService;

    @RequestMapping("queryAreaByPid")
    @ResponseBody
    public ResultData queryAreaByPid(Integer pid){
        List<Area> areas = areaService.queryAreaByPid(pid);
        return ResultData.success(areas);
    }
}
